#include<stdio.h>
int main()
{
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int n;
	scanf("%d",&n);
	printf("%d",a[n-1]);
	return 0;
}